package com.cjy.common.bean;

import java.util.ArrayList;
import java.util.List;

/**
 * easyui 树数据模型 2013-12-10 下午2:49:27
 * 
 * @author hubery.niejinzhen
 */
public class EasyuiTreeNode {
	private String id; // id
	private String text; // 文本
	private String state; // 打开状态
	private String iconCls; // 图片
	private Boolean checked; // 选中状态
	private List<EasyuiTreeNode> children = new ArrayList<EasyuiTreeNode>(); // 子节点
	private Object attributes; // 自定义属性，通常使用为HashMap，但不限定

	public String getIconCls() {
		return iconCls;
	}

	public void setIconCls(String iconCls) {
		this.iconCls = iconCls;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getText() {
		return text;
	}

	public void setText(String text) {
		this.text = text;
	}

	public String getState() {
		return state;
	}

	public void setState(String state) {
		this.state = state;
	}

	public Boolean getChecked() {
		return checked;
	}

	public void setChecked(Boolean checked) {
		this.checked = checked;
	}

	public List<EasyuiTreeNode> getChildren() {
		return children;
	}

	public void setChildren(List<EasyuiTreeNode> children) {
		this.children = children;
	}

	public Object getAttributes() {
		return attributes;
	}

	public void setAttributes(Object attributes) {
		this.attributes = attributes;
	}

	/**
	 * 添加孩子节点
	 * 
	 * @author hubery.niejinzhen
	 * @param pm
	 *            void
	 */
	public void addChild(EasyuiTreeNode tree) {
		children.add(tree);
	}
}
